<HTML
><HEAD
><TITLE
>Categories</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"><LINK
REL="HOME"
TITLE="DataparkSearch Engine 4.50"
HREF="index.en.html"><LINK
REL="UP"
TITLE="Subsections"
HREF="dpsearch-subsections.en.html"><LINK
REL="PREVIOUS"
TITLE="Subsections"
HREF="dpsearch-subsections.en.html"><LINK
REL="NEXT"
TITLE="Languages support"
HREF="dpsearch-international.en.html"><LINK
REL="STYLESHEET"
TYPE="text/css"
HREF="datapark.css"><META
NAME="Description"
CONTENT="DataparkSearch - Full Featured Web site Open Source Search Engine Software over the Internet and Intranet Web Sites Based on SQL Database. It is a Free search software covered by GNU license."><META
NAME="Keywords"
CONTENT="shareware, freeware, download, internet, unix, utilities, search engine, text retrieval, knowledge retrieval, text search, information retrieval, database search, mining, intranet, webserver, index, spider, filesearch, meta, free, open source, full-text, udmsearch, website, find, opensource, search, searching, software, udmsearch, engine, indexing, system, web, ftp, http, cgi, php, SQL, MySQL, database, php3, FreeBSD, Linux, Unix, DataparkSearch, MacOS X, Mac OS X, Windows, 2000, NT, 95, 98, GNU, GPL, url, grabbing"><SCRIPT
SRC="http://www.google-analytics.com/urchin.js"
TYPE="text/javascript"></SCRIPT><SCRIPT
SRC="http://www.dataparksearch.org/ga.js"
TYPE="text/javascript"></SCRIPT></HEAD
><BODY
CLASS="sect1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000C4"
VLINK="#1200B2"
ALINK="#C40000"
><!--#include virtual="body-before.html"--><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>DataparkSearch Engine 4.50: Reference manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="dpsearch-subsections.en.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 6. Subsections</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="dpsearch-international.en.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="categories"
>6.2. Categories</A
></H1
><A
NAME="AEN3164"
></A
><P
>There is a categories editor written in  Perl. You can
get it in <TT
CLASS="filename"
>perl/cat_ed/</TT
> subdirectory of <SPAN
CLASS="application"
>DataparkSearch</SPAN
>
installation.</P
><P
>Categories are similar to tag feature, but nested. So you can have one category inside another and so on.</P
><P
>Basic points:
	<P
></P
><UL
><LI
><P
>there are up to 6 nested levels;</P
></LI
><LI
><P
>every level occupies 2 hex or 36 base digits;</P
></LI
><LI
><P
>parameter for setting category is
<TT
CLASS="parameter"
><I
>path</I
></TT
>, which can be empty (means root category)
or up to 10 chars long (means deepest category).</P
></LI
></UL
>
        </P
><P
>You can also set up symlinks, e.g. categories that are
actually links to other categories. <TT
CLASS="literal"
>link</TT
> database
field is used for that. In the symlink last two characters should be
@@. In example above Moto-&#62;BMW is a link to Auto-&#62;BMW.</P
><P
>First notice that category in the server table is set to be
11 characters long. This means you can use a valid character to keep
track of categories. If you are going to keep a category tree of any
size, then I would suggest using the category editor. But anyways, here's how it works.
</P
><P
>You can use either the tag column or the category column
in the server for the same thing. Or you can categorize a site in two
different ways. For example you could keep track of sites that are
owned by a certain company and then categorize them as well. You could
use the tag option to keep of ownership and use the category option
for categories. When I explain the category option, it goes the same
for the tag option. </P
><P
>A category can be broken down any way you choose. But
for it to work with the category editor, I believe for now, you have
to use two characters for each level. If you use the category editor
you have the choice to use a hex number going from 0-F or a 36 base
number going from 0-Z. Therefore a top-level category like 'Auto'
would be 01. If it has a subcategory like 'Ford', then it would be 01
(the parent category) and then 'Ford' which we will give 01. Put those
together and you get 0101. If 'Auto' had another subcategory named
'VW', then its id would be 01 because it belongs to the 'Ford'
category and then 02 because it's the next category. So its id would
be 0102. If VW had a sub category called 'Engine' then it's id would
start at 01 again and it would get the 'VW' id 02 and 'Auto' id of 01,
making it 010201.</P
><P
>If you want to search for sites under that category then
you pass it <TT
CLASS="literal"
>cat=010201</TT
> in the url...so create a
select box and give like that:
	<PRE
CLASS="programlisting"
>&#13;&#60;OPTION value="01"&#62;AUTO
&#60;OPTION value="0101"&#62;Ford
</PRE
>
	</P
><P
>and so on...</P
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="category_cmd"
>6.2.1. <B
CLASS="command"
>Category</B
> command</A
></H2
><A
NAME="AEN3191"
></A
><PRE
CLASS="programlisting"
>&#13;Category &#60;string&#62;
</PRE
><P
>&#13;You may distribute documents between nested categories. Category
is a string in hex number notation. You may have up to 6 levels with
256 members per level. Empty category means the root of category tree.
Take a look into <A
HREF="dpsearch-categories.en.html"
>Section 6.2</A
> for more information.
<PRE
CLASS="programlisting"
>&#13;# This command means a category on first level:
Category AA
# This command means a category on 5th level:
Category FFAABBCCDD
</PRE
>
</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="categoryif_cmd"
>6.2.2. <B
CLASS="command"
>CategoryIf</B
> command</A
></H2
><A
NAME="AEN3201"
></A
><PRE
CLASS="programlisting"
>&#13;CategoryIf &#60;category&#62; [Match|NoMatch] [NoCase|Case] [String|Regex] &#60;section&#62; &#60;arg&#62; [&#60;arg&#62; ... ]
</PRE
><P
>&#13;Mark document by &#60;category&#62; category, if the value of <TT
CLASS="option"
>section</TT
> match <TT
CLASS="option"
>arg</TT
> pattern given.
The meaning of first three optional parameters is exactly the same 
as for the <B
CLASS="command"
>Allow</B
> command (see <A
HREF="dpsearch-indexcmd.en.html#allow_cmd"
>Section 3.10.14</A
>).
</P
><P
>Example
<PRE
CLASS="programlisting"
>&#13;CategoryIf 010F regex Title "JOB ID"
</PRE
>
</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="dpsearch-subsections.en.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.en.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="dpsearch-international.en.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Subsections</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="dpsearch-subsections.en.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Languages support</TD
></TR
></TABLE
></DIV
><!--#include virtual="body-after.html"--></BODY
></HTML
>